import UserTable from "../../Model/Table/UserTable";
import Iuser from "./Iuser";
import axios from "../../Model/axios";
import { AxiosPromise } from "axios";

class User implements Iuser{
    query(params: UserTable): AxiosPromise {
        return axios({
            method:"GET",
            url:"userinfo",
            params
        })
    }
    del(id?: number): AxiosPromise {
        return axios({
            method:"DELETE",
            url:"userinfo/"+id,

        })
    }
    add(data:UserTable): AxiosPromise {
        return axios({
            method:"POST",
            url:"userinfo",
            data
        })
    }
}
export default new User();